// pages/early_warning/early_warning.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    name: "预警提示",
    TabCur: 0,
    values: '',
    tes_facility: [{
      name: "新天联华气象科技有限公司",
      id: 0,
      information: '企业地址-***-*-*-*-*',
      phone: '12121212121',
      status: 1,
    }, {
      name: "新天联华气象科技有限公司",
      id: 1,
      information: '企业地址-***-*-*-*-*',
      phone: '12121212121',
      status: 0,

    }, {
      name: "新天联华气象科技有限公司",
      id: 2,
      information: '企业地址-***-*-*-*-*',
      phone: '12121212121',
      status: 3,

    }, {
      name: "新天联华气象科技有限公司",
      id: 3,
      information: '企业地址-***-*-*-*-*',
      phone: '12121212121',
      status: 0,

    }, {
      name: "新天联华气象科技有限公司",
      id: 4,
      information: '企业地址-***-*-*-*-*',
      phone: '12121212121',
      status: 1,

    }, {
      name: "新天联华气象科技有限公司",
      id:5,
      information: '企业地址-***-*-*-*-*',
      phone: '12121212121',
      status: 3,

    }]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },
  Gotback() {
    wx.navigateBack({
      delta: 1,
    })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },
  _details(e) {
    let that = this
    let ID = e.currentTarget.dataset.id
    let num = that.data.tes_facility;

    num.map(item => {
      if (item.status == 3) {
        wx.navigateTo({
          url: `./expiring_soon/expiring_soon`
        });
      } else if (item.status == 0) {
        wx.navigateTo({
          url: `./company_details/company_details`
        });
      }
      wx.navigateTo({
        url: `./expiring_soon/expiring_soon`
      });
    })


  },

  review_details(e) {
    let that = this
    wx.navigateTo({
      url: `./review_details/review_details`
    });
  },
  tabSelect(e) {

    this.setData({
      TabCur: e.currentTarget.dataset.id,
    })
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})